import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询包
export function selectUpgradeTaskList(query) {
  return request({
    url: '/device/upgradeTask/selectUpgradeTaskList',
    method: 'get',
    params: query
  })
}

//查询详情
export function selectUpgradeTask(uid) {
  return request({
    url: '/device/upgradeTask/selectUpgradeTask/' + parseStrEmpty(uid),
    method: 'get',
  })
}

//删除包
export function deleteUpgradeTask(data) {
  return request({
    url: '/device/upgradeTask/deleteUpgradeTask',
    method: 'post',
    data: data
  })
}

//修改包
export function updateUpgradeTask(data) {
  return request({
    url: '/device/upgradeTask/updateUpgradeTask',
    method: 'post',
    data: data
  })
}

//插入包
export function insertUpgradeTask(data) {
  return request({
    url: '/device/upgradeTask/insertUpgradeTask',
    method: 'post',
    data: data
  })
}

//更新任务
export function updateUpgradeTaskStatus(data) {
  return request({
    url: '/device/upgradeTask/updateUpgradeTaskStatus',
    method: 'post',
    data: data
  })
}
